<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Helpers.FileIO</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_Helpers-FileIO.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
></TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Helpers.FileIO</FONT
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
>this module contains file IO functionality
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataBaseDir"
>dataBaseDir</A
> :: FilePath</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Afilter_dot_dirs"
>filter_dot_dirs</A
> :: [FilePath] -&gt; [FilePath]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aget_file_date"
>get_file_date</A
> :: FilePath -&gt; IO String</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aread_file"
>read_file</A
> :: FilePath -&gt; IO ByteString</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aretrieve_directory_contents"
>retrieve_directory_contents</A
> :: FilePath -&gt; IO [FilePath]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Atry_read_file"
>try_read_file</A
> :: FilePath -&gt; IO (Maybe ByteString)</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Documentation</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataBaseDir"
><A NAME="v%3AdataBaseDir"
></A
></A
><B
>dataBaseDir</B
> :: FilePath</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:filter_dot_dirs"
><A NAME="v%3Afilter_dot_dirs"
></A
></A
><B
>filter_dot_dirs</B
> :: [FilePath] -&gt; [FilePath]</TD
></TR
><TR
><TD CLASS="doc"
>filter the .. and . directories from a list of paths
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:get_file_date"
><A NAME="v%3Aget_file_date"
></A
></A
><B
>get_file_date</B
> :: FilePath -&gt; IO String</TD
></TR
><TR
><TD CLASS="doc"
>return the modification time of a file as a string of
 the form mm-dd-yy-hh-mm
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:read_file"
><A NAME="v%3Aread_file"
></A
></A
><B
>read_file</B
> :: FilePath -&gt; IO ByteString</TD
></TR
><TR
><TD CLASS="doc"
>open the given file. If things fail try to detect
 why and provide the user with some sort of useful error 
 message (generic one otherwise); then quit 
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:retrieve_directory_contents"
><A NAME="v%3Aretrieve_directory_contents"
></A
></A
><B
>retrieve_directory_contents</B
> :: FilePath -&gt; IO [FilePath]</TD
></TR
><TR
><TD CLASS="doc"
>returns a list of the content of dir sans <A HREF="--.html"
>..</A
> and <A HREF="-.html"
>.</A
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:try_read_file"
><A NAME="v%3Atry_read_file"
></A
></A
><B
>try_read_file</B
> :: FilePath -&gt; IO (Maybe ByteString)</TD
></TR
><TR
><TD CLASS="doc"
>try to open the given file and return the content
 as a Just ByteString if it exists and Nothing otherwise
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.4.2</TD
></TR
></TABLE
></BODY
></HTML
>
